# -*- coding: UTF-8 -*-
"""
@author: tgy
@file: recursion_demo.py
@time: 2021/01/23
"""


def list_print(lists):
    ...
    if not isinstance(lists, list):
        return lists
    sum = 0
    for val in lists:
        sum += list_print(val)
    return sum

def test01(*args):
    ...

def test02(names:(1,10),age:int)->int:
    ...

def test03(n):

    for x in range(n):
        yield x*2

names = [1.2,2]

if __name__ == '__main__':
    pass
    # res = list_print([1, [2, [3, 4], 5], 6, [7, 8]])
    # print(res)
    # print(list_print.__name__)
    # print(list_print.__code__.co_argcount)
    # print(test01.__code__.co_argcount)
    # print(dir(test01))
    # print(test02.__annotations__)
    print(test03(10))
    print(test03(10).__iter__())
    import __main__
    # print(__main__.names)
    print(__main__)